:root {
    --side-bar-bg-color: #f1f5fae4;
    --control-text-color: #37352f;
    --bg-color: #ffffff;
    --text-color: #37352f;
    --heading-color: #37352f;
    --blockquote-color: #787774;
    --link-color: #4170cf;
    /* --code-bg: #e5e5f0; */
    --code-bg: #f3f8f9;
    --table-border-color: #bfc1c5;

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Noto Sans SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--bg-color);
}

#write {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px 20px;
    padding-bottom: 40px;
}

/* Source mode and sidebar width */
#typora-source {
    max-width: 90%;
    margin: 0 auto;
}

/* 当屏幕宽度 ≥ 1400px 时，调整主编辑区域的样式 */
@media only screen and (min-width: 1400px) {
    #write {
        max-width: 1000px;
    }
}

/* Headings */
h1 {
    position: relative;
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 1.0rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--heading-color);
    cursor: text;
}

h2, h3, h4, h5, h6 {
    position: relative;
    margin-top: 1.25rem;
    margin-bottom: 1.0rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--heading-color);
    cursor: text;
}

h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}

h1 {
    font-size: 1.6em;
    margin-top: 0;
    padding-bottom: 0.3em;
    /* border-bottom: 1px solid var(--table-border-color); */
}

h2 {
    font-size: 1.4em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--table-border-color);
}

h3 { font-size: 1.25em; }
h4 { font-size: 1.1em; }
h5 { ; }
h6 { font-size: 1.0em; color: var(--control-text-color); }

/* Text elements */
p, blockquote, ul, ol, dl, table {
    margin: 0.8em 0;
}

li > ol, li > ul {
    margin: 0;
}

hr {
    height: 1px;
    padding: 0;
    margin: 16px 0;
    background-color: var(--table-border-color);
    border: 0 none;
}

/* Lists */
ul, ol {
    padding-left: 2em;
}

ul ul {
    padding-left: 2em;
    list-style-type: circle;  /* 第二级：空心圆 */
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--table-border-color);
    padding: 0 1em;
    color: var(--blockquote-color);
    margin-left: 0;
    margin-right: 0;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    overflow: auto;
}

table tr {
    border-top: 1px solid var(--table-border-color);
    background-color: var(--bg-color);
}

table th, table td {
    padding: 0.5em 1em;
    border: 1px solid var(--table-border-color);
}

table th {
    font-weight: 600;
    background-color: var(--code-bg);
}

table tr:nth-child(2n) {
    background-color: var(--code-bg);
}

/* Code */
.md-fences, code, tt {
    font-family:  "Cascadia Mono", "Noto Sans SC", Menlo, monospace;  /* There is an issue with tab alignment when using Consolas*/
    font-size: 0.90 em;
    background-color: var(--code-bg);
    border-radius: 3px;
    padding: 0;
    padding: 2px 2px 2px 2px;
}

code, tt {
    font-size: 0.85 em;
    /* padding: 0.2em 0.2em; */
    padding: 1px 2px 1px 2px;
    margin: 0;
    border: none;
    background-color: #e5e5f0b6;
}

.md-fences {
    margin: 15px 0;
    padding: 0.8em 1em;
    border: 1px solid var(--table-border-color);
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images */
/* .md-image > .md-meta {
    font-family: inherit;
    font-size: 0.9em;
    color: var(--control-text-color);
} */

/* 图片描述文字样式 */
.md-image > .md-meta {
    font-family: "Noto Sans SC", sans-serif; /* 中文字体优先 */
    font-size: 0.9em !important;
    color: #494747 !important;
}

/* Task lists */
.md-task-list-item > input {
    margin-left: -1.3em;
}

/* Sidebar */
.sidebar-content {
    font-family: inherit;
    font-size: 14px !important;
}

.mac-seamless-mode #typora-sidebar {
    background-color: var(--side-bar-bg-color);
}

/* Focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

/* Print styles */
@media print {
    html {
        font-size: 13px;
    }
    pre {
        page-break-inside: avoid;
        word-wrap: break-word;
    }
    .typora-export h1,
    .typora-export h2 {
        border-bottom: none;
    }
}

/* Notion-like callouts */
blockquote {
    background-color: var(--code-bg);
    border-radius: 4px;
    padding: 1em;
    border-left: 4px solid #dfe2e5;
}

/* Adjustments for mobile */
@media only screen and (max-width: 768px) {
    #write {
        padding: 20px 15px;
    }
}


/* 侧边栏大纲整体样式 */
.sidebar-content {
    font-size: 15px;
    line-height: 1.3;
}

/* 大纲中的所有列表项 */
.outline-item {
    padding: 4px 0;
}

/* 不同层级的缩进控制 */
.outline-item-l1 {
    padding-left: 0px;    /* 一级标题 */
    font-weight: bold;
}

.outline-item-l2 {
    padding-left: 15px;   /* 二级标题 */
    font-weight: 600;
}

.outline-item-l3 {
    padding-left: 30px;   /* 三级标题 */
}

.outline-item-l4 {
    padding-left: 45px;   /* 四级标题 */
}

.outline-item-l5 {
    padding-left: 60px;   /* 五级标题 */
}

.outline-item-l6 {
    padding-left: 75px;   /* 六级标题 */
}
